package com.netease.nie.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.netease.nie.common.CommonService;
import com.netease.nie.dao.TopicGoodsDao;
import com.netease.nie.dto.TopicGoodsDto;
import com.netease.nie.model.TopicGoods;

@Service
public class TopicGoodsServiceImpl extends CommonService implements TopicGoodsService {

	@Autowired
	private TopicGoodsDao topicGoodsDao;

	public List<TopicGoodsDto> queryTopicGoodsDtosByTopicId(int topicId) {
		List<TopicGoods> topicGoodsList = topicGoodsDao.queryTopicGoodsesByTopicId(topicId);
		List<TopicGoodsDto> topicGoodsDtoList = generateTopicGoodsDtos(topicGoodsList);
		return topicGoodsDtoList;
	}
	
	
}
